package com.sky.web.app;

import com.sky.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping(value = "/user/shop")
public class AppShopController {


    @Autowired
    private RedisTemplate redisTemplate;

    // 查询店铺状态
    @GetMapping("/status")
    public Result status() {
        log.info("查询店铺状态");
        return Result.success(redisTemplate.opsForValue().get("SHOP_STATUS"));
    }
}
